package com.spring.cn.annotation.generic;

import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.Resource;

/**
 * @author liangd
 * date 2020-11-16 11:01
 * code 泛型依赖注入
 */
public class BaseService<T> {

    /**
     * 在此处添加注解，子类可以继承
     */
    @Autowired
    protected BaseRepository<T> baseRepository;

    public void add(){
        System.out.println("add...");
        System.out.println(baseRepository);
    }
}
